<template>
  <div>
          <span>{{goodsname}}</span>
          <button @click="addfn(ind)">+</button>
          <span>{{count}}</span>
          <button @click="delfn(ind)">-</button>
  </div>
</template>

<script>
export default {
    // 父->子
    props:["goodsname","ind","count"],
    methods:{
        addfn(ind){
            this.$emit("add",ind)

        },
        delfn(ind){
             this.$emit("del",ind)
        }
    }
}
</script>

<style>

</style>